package vip.xiaonuo.modular.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import vip.xiaonuo.modular.dao.MySqlMapper;

import javax.annotation.Resource;
import java.util.List;

@Service
public class MySqlService {

    @Autowired
    private MySqlMapper mySqlMapper;

    /**
     * 执行sql 返回Object
     * @param querySql
     * @return
     */
    public Object getObjectBySql(String querySql){
        return mySqlMapper.querySqlByOnObject(querySql);
    }

    public List<Long> getIdByList(String querySql){
        return mySqlMapper.querySqlByList(querySql);
    }

    public void updateSql(String updateSel){
        mySqlMapper.updateSql(updateSel);
    }

    public void deleteSql(String deleteSql){
        mySqlMapper.deleteSql(deleteSql);
    }
}
